﻿using DevelopAssistant.Service;
using ICSharpCode.WinFormsUI.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DevelopAssistant.Core.ToolBox
{
    public partial class MessageDialog : BaseForm
    {
        public MessageDialog()
        {
            InitializeComponent();
        }

        public string ResultText
        {
            get
            {
                return this.textBox1.Text;
            }
        }

        public MessageDialog(string MessageText)
            : this()
        {
            label1.Text = MessageText;
            this.XTheme = AppSettings.WindowTheme;
        }

        private void btnApplyOk_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.textBox1.Text))
            {
                MessageBox.Show("请输入名称");
                return;
            }            
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void btnCancle_Click(object sender, EventArgs e)
        {
            this.Close();
        }


    }
}
